import Login from './pages/Login.vue'
import Register from './pages/register/index.vue'
// import Home from './pages/Home.vue'
// import Main from './pages/Main.vue'
// import NotFound from './pages/404.vue'
// import map from './pages/map/map.vue'
// import scheduling from './pages/scheduling/scheduling.vue'
// import myScheduling from './pages/scheduling/myScheduling.vue'
// import demandScheduling from './pages/scheduling/demandScheduling.vue'
// import carList from './pages/cars/carList.vue'
// import substationList from './pages/substation/substationList.vue'
// import equipmentProblem from './pages/equipment/equipmentProblem.vue'
// import appointmentList from './pages/appointment/appointmentList.vue'
// import appointmentManage from './pages/appointment/appointmentManage.vue'
// import userGroup from './pages/userGroup/userGroup.vue'
// import taskList from './pages/task/taskList.vue'
// import taskLog from './pages/task/taskLog.vue'
// import deliverLearning from './pages/learning/deliverLearning.vue'
// import learningList from './pages/learning/learningList.vue'
// import deliverAnnouncement from './pages/announcement/deliverAnnouncement.vue'
// import announcementList from './pages/announcement/announcementList.vue'
// import knowledgeBase from './pages/knowledgeBase/knowledgeBase.vue'
// // import test from './pages/tools/test'
// import toolsCode from './pages/tools/toolsCode'
// import toolsCodeManage from './pages/tools/toolsCodeManage'
// import userManage from './pages/system/userManage'
// import roleManage from './pages/system/roleManage'
// import menuManage from './pages/system/menuManage'
// import departManage from './pages/system/departManage'
// import dataDictionary from './pages/system/dataDictionary'
// import taskTeamBition from './pages/task/taskTeamBition'
// import taskPlanList from './pages/task/taskPlanList'
export const routes= [
  {
    path: '/',
    component: Login,
    name: '登录',
    hidden: true
  },{
    path: '/register',
    component: Register,
    name: '商户注册',
    hidden: false,
    meta:{noToken:true}
  },
       // 系统管理
//   {
//     path: '/home',
//     component:Home,
//     name: '系统管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       {path: '/userManage', name: '用户管理' ,  meta: {requireAuth: true},  component:userManage},
//       {path: '/roleManage', name: '角色管理' ,  meta: {requireAuth: true},  component:roleManage},
//       {path: '/menuManage', name: '菜单管理' ,  meta: {requireAuth: true},  component:menuManage},
//       {path: '/departManage', name: '部门管理' ,  meta: {requireAuth: true},  component:departManage},
//       {path: '/dataDictionary', name: '数据字典' ,  meta: {requireAuth: true},  component:dataDictionary},
//     ]
//   },
];

// 异步组件
export const routesComponent={
  // Home,c
  Home:resolve => require(['./pages/Home.vue'], resolve),
  NotFound:resolve=>{require(['./pages/404.vue'], resolve)},
  loginCount:resolve=>{require(['./pages/loginCount.vue'], resolve)}, 
//map:resolve=>{require(['./pages/classify/list'], resolve)},
  map:resolve=>{require(['./pages/index/page'], resolve)},
  roleDataRule:resolve=>{require(['./pages/datarule/RoleDataRule'], resolve)},
  ruleManage:resolve=>{require(['./pages/datarule/ruleManage'], resolve)},
  userManage:resolve=>{require(['./pages/system/userManage'], resolve)},
  roleManage:resolve=>{require(['./pages/system/roleManage'], resolve)},
  menuManage:resolve=>{require(['./pages/system/menuManage'], resolve)},
  departManage:resolve=>{require(['./pages/system/departManage'], resolve)},
  dataDictionary:resolve=>{require(['./pages/system/dataDictionary'], resolve)},
  shopList:resolve=>{require(['./pages/shop/List'], resolve)},
  brandList:resolve=>{require(['./pages/brand/List'], resolve)},
  modelList:resolve=>{require(['./pages/model/List'], resolve)},
  goodTypeList:resolve=>{require(['./pages/goodType/List'], resolve)},
  goodsList: resolve => { require(['./pages/goods/list'], resolve) },
  userInfo: resolve => { require(['./pages/userInfo/index'], resolve) },
  specification: resolve => { require(['./pages/specification/List'], resolve) },
  property: resolve => { require(['./pages/property/List'], resolve) },
//goodsSpecification: resolve => { require(['./pages/goods/specification'], resolve) },

  //类别管理
//Classify:resolve=>{require(['./pages/classify/List'], resolve)},
}
//正常路由
// export const snycRoutes=[
//   {
//     path: '/404',
//     component:NotFound,
//     name: '',
//     hidden: true
//   },
//   // 首页
//   {
//     path: '/home',
//     component:Home,
//     name: '',
//     meta: {requireAuth: true},
//     leaf: true,//只有一个节点
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/map',meta: {requireAuth: true} , name: '首页' ,component:map },
//     ]
//   },
//
//   //排版管理
//   {
//     path: '/home',
//     component: Home,
//     name: '排班管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/scheduling',meta: {requireAuth: true} , name: '排班管理' ,component:scheduling},
//       { path: '/myScheduling',meta: {requireAuth: true} , name: '我的排班情况' ,component:myScheduling},
//       { path: '/demandScheduling',meta: {requireAuth: true} , name: '值班查询' ,component:demandScheduling},
//     ]
//   },
//
//   //用户组
//   {
//     path: '/home',
//     component: Home,
//     name: '用户组管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/userGroup',meta: {requireAuth: true} , name: '用户组' ,component:userGroup},
//
//       // { path: '/userGroup', meta: {requireAuth: true},component: userGroup, name: '用户组' }
//     ]
//   },
//
//   //任务管理
//   {
//     path: '/home',
//     component:Home,
//     name: '任务管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/taskList',meta: {requireAuth: true} , name: '任务列表' ,component:taskList},
//       { path: '/taskLog',meta: {requireAuth: true} , name: '站务日志' ,component:taskLog},
//       { path: '/taskTeamBition', meta: {requireAuth: true},name:"工单管理",
//         component: taskTeamBition
//       },
//       { path: '/taskPlanList', meta: {requireAuth: true},name:"计划库",
//         component: taskPlanList
//       },
//
//     ]
//   },
//
//
//   //车辆管理
//   {
//     path: '/home',
//     component:Home,
//     name: '车辆管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       // { path: '/carlist',meta: {requireAuth: true}, component:carList , name: '车辆' },
//
//       { path: '/carlist',meta: {requireAuth: true} , name: '车辆' ,component: carList},
//     ]
//   },
//   // 变电站
//   {
//     path: '/home',
//     component:Home,
//     name: '变电站管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/substationlist',meta: {requireAuth: true}, name: '变电站',component:substationList},
//
//     ]
//   },
//   //问题库
//   {
//     path: '/home',
//     component:Home,
//     name: '问题库管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/equipmentproblem',meta: {requireAuth: true} , name: '问题库' ,component:equipmentProblem},
//     ]
//   },
//   //约工管理
//   {
//     path: '/home',
//     component:Home,
//     name: '约工管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/appointmentlist',meta: {requireAuth: true}, name: '约工列表', component:appointmentList},
//       { path: '/appointmentmanage',meta: {requireAuth: true}, name: '约工单位和人员管理', component:appointmentManage},
//     ]
//   },
//   //学习活动
//   {
//     path: '/home',
//     component:Home,
//     name: '学习活动',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/deliverLearning',meta: {requireAuth: true}, name: '发布学习', component:deliverLearning},
//       { path: '/learningList',meta: {requireAuth: true}, name: '学习列表', component:learningList},
//     ]
//   },
//   //办公通知
//   {
//     path: '/home',
//     component:Home,
//     name: '办公通知',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/deliverAnnouncement',meta: {requireAuth: true}, name: '发布通知', component:deliverAnnouncement},
//       { path: '/announcementList',meta: {requireAuth: true}, name: '通知列表', component:announcementList},
//     ]
//   },
//   //知识库管理
//   {
//     path: '/home',
//     component:Home,
//     name: '知识库管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/knowledgeBase',meta: {requireAuth: true}, name: '知识库', component:knowledgeBase},
//       // { path: '/knowledgeBase',meta: {requireAuth: true}, component:knowledgeBase , name: '知识库' },
//     ]
//   },
//   //工器具
//   {
//     path: '/home',
//     component:Home,
//     name: '二维码应用',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       // { path: '/test', meta: {requireAuth: true},component:test , name: '测试' },
//       { path: '/toolsCode',meta: {requireAuth: true}, name: '物资管理', component:toolsCode},
//       { path: '/toolsCodeManage',meta: {requireAuth: true}, name: '类别管理', component:toolsCodeManage},
//     ]
//   },
//
//   // 系统管理
//   {
//     path: '/home',
//     component:Home,
//     name: '系统管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       {path: '/userManage', name: '用户管理' ,  meta: {requireAuth: true},  component:userManage},
//       {path: '/roleManage', name: '角色管理' ,  meta: {requireAuth: true},  component:roleManage},
//       {path: '/menuManage', name: '菜单管理' ,  meta: {requireAuth: true},  component:menuManage},
//       {path: '/departManage', name: '部门管理' ,  meta: {requireAuth: true},  component:departManage},
//       {path: '/dataDictionary', name: '数据字典' ,  meta: {requireAuth: true},  component:dataDictionary},
//     ]
//   },
//
//   {
//     path: '*',
//     hidden: true,
//     redirect: { path: '/404' }
//   }
// ];
//异步路由
// export const snycRoutes=[
//   {
//     path: '/404',
//     component:routesComponent.NotFound,
//     name: '',
//     hidden: true
//   },
//   // 首页
//   {
//     path: '/home',
//     component: routesComponent.Home,
//     name: '',
//     meta: {requireAuth: true},
//     leaf: true,//只有一个节点
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/map',meta: {requireAuth: true} , name: '首页' ,component:routesComponent.map },
//     ]
//   },
//
//   //排版管理
//   {
//     path: '/home',
//     component: routesComponent.Home,
//     name: '排班管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/scheduling',meta: {requireAuth: true} , name: '排班管理' ,component:routesComponent.scheduling},
//       { path: '/myScheduling',meta: {requireAuth: true} , name: '我的排班情况' ,component:routesComponent.myScheduling},
//       { path: '/demandScheduling',meta: {requireAuth: true} , name: '值班查询' ,component:routesComponent.demandScheduling},
//     ]
//   },
//
//   //用户组
//   {
//     path: '/home',
//     component: routesComponent.Home,
//     name: '用户组管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/userGroup',meta: {requireAuth: true} , name: '用户组' ,component:routesComponent.userGroup},
//
//       // { path: '/userGroup', meta: {requireAuth: true},component: userGroup, name: '用户组' }
//     ]
//   },
//
//   //任务管理
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '任务管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/taskList',meta: {requireAuth: true} , name: '任务列表' ,component:routesComponent.taskList},
//       { path: '/taskLog',meta: {requireAuth: true} , name: '站务日志' ,component:routesComponent.taskLog},
//       { path: '/taskTeamBition', meta: {requireAuth: true},name:"工单管理",
//         component: routesComponent.taskTeamBition
//       },
//       { path: '/taskPlanList', meta: {requireAuth: true},name:"计划库",
//         component: routesComponent.taskPlanList
//       },
//
//     ]
//   },
//
//
//   //车辆管理
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '车辆管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       // { path: '/carlist',meta: {requireAuth: true}, component:carList , name: '车辆' },
//
//       { path: '/carlist',meta: {requireAuth: true} , name: '车辆' ,component: routesComponent.carlist},
//     ]
//   },
//   // 变电站
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '变电站管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/substationlist',meta: {requireAuth: true}, name: '变电站',component:routesComponent.substationlist},
//
//     ]
//   },
//   //问题库
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '问题库管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/equipmentproblem',meta: {requireAuth: true} , name: '问题库' ,component:routesComponent.equipmentproblem},
//     ]
//   },
//   //约工管理
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '约工管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/appointmentlist',meta: {requireAuth: true}, name: '约工列表', component:routesComponent.appointmentlist},
//       { path: '/appointmentmanage',meta: {requireAuth: true}, name: '约工单位和人员管理', component:routesComponent.appointmentmanage},
//     ]
//   },
//   //学习活动
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '学习活动',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/deliverLearning',meta: {requireAuth: true}, name: '发布学习', component:routesComponent.deliverLearning},
//       { path: '/learningList',meta: {requireAuth: true}, name: '学习列表', component:routesComponent.learningList},
//     ]
//   },
//   //办公通知
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '办公通知',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/deliverAnnouncement',meta: {requireAuth: true}, name: '发布通知', component:routesComponent.deliverAnnouncement},
//       { path: '/announcementList',meta: {requireAuth: true}, name: '通知列表', component:routesComponent.announcementList},
//     ]
//   },
//   //知识库管理
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '知识库管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       { path: '/knowledgeBase',meta: {requireAuth: true}, name: '知识库', component:routesComponent.knowledgeBase},
//       // { path: '/knowledgeBase',meta: {requireAuth: true}, component:knowledgeBase , name: '知识库' },
//     ]
//   },
//   //工器具
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '二维码应用',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       // { path: '/test', meta: {requireAuth: true},component:test , name: '测试' },
//       { path: '/toolsCode',meta: {requireAuth: true}, name: '物资管理', component:routesComponent.toolsCode},
//       { path: '/toolsCodeManage',meta: {requireAuth: true}, name: '类别管理', component:routesComponent.toolsCodeManage},
//     ]
//   },
//
//   // 系统管理
//   {
//     path: '/home',
//     component:routesComponent.Home,
//     name: '系统管理',
//     iconCls: 'el-icon-message',//图标样式class
//     children: [
//       {path: '/userManage', name: '用户管理' ,  meta: {requireAuth: true},  component:routesComponent.userManage},
//       {path: '/roleManage', name: '角色管理' ,  meta: {requireAuth: true},  component:routesComponent.roleManage},
//       {path: '/menuManage', name: '菜单管理' ,  meta: {requireAuth: true},  component:routesComponent.menuManage},
//       {path: '/departManage', name: '部门管理' ,  meta: {requireAuth: true},  component:routesComponent.departManage},
//       {path: '/dataDictionary', name: '数据字典' ,  meta: {requireAuth: true},  component:routesComponent.dataDictionary},
//     ]
//   },
//
//   {
//     path: '*',
//     hidden: true,
//     redirect: { path: '/404' }
//   }
// ];
